package hgz.stu.review.ruijie.enviroment;

public enum SkyEngineEnvType {
    /**
     * 开发环境
     */
    DEV,
    /**
     * 测试环境
     */
    TEST,
    /**
     * 生产环境
     */
    PROD,
    /**
     * 失败的运行环境
     */
    FAIL,
    ;

    public static SkyEngineEnvType convert(String type) {
    	if(null == type) return FAIL;
        SkyEngineEnvType[] types = SkyEngineEnvType.values();
        for (SkyEngineEnvType envType : types) {
            if (type.toUpperCase().equals(envType.name())) {
                return envType;
            } ;
        }

        return FAIL;
    }
}
